<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="/layout/page/form/page-fieldset-template.xhtml">	
	<ui:param name="addBodyViewBean" value="#{commonContentViewBean.parent}" />
	<ui:param name="compId" value="#{addBodyViewBean.id}" />
	<ui:param name="compTitle" value="新建板块" />	
	<ui:param name="compToggleable" value="true" />
	<ui:define name="compContent">
	<center>
	<h:panelGrid columns="2">
		<h:panelGroup style="float: right;">
	     	<h:outputText value="板块名称："/>
	 	</h:panelGroup>
		<h:panelGroup style="float: left;">
			<h:inputText id="bodyName" value="#{addBodyViewBean.bodyname}"
				style="width: 180px;" />
		</h:panelGroup>
		<h:panelGroup style="float: right;">
	     	<h:outputText value="所属分类："/>
	 	</h:panelGroup>
		<h:panelGroup style="float: left;">
			<h:selectOneMenu id="typeName" value="#{addBodyViewBean.dspBbsSortEntity.sortuuid}" style="width: 176px;">
					<f:selectItems value="#{addBodyViewBean.slist}" />				
			</h:selectOneMenu>
		</h:panelGroup>
			<h:panelGroup style="float: right;">
	     	<h:outputText value="图标："/>
	 	</h:panelGroup>
	 	<h:panelGroup>
	 	<p:growl id="messages" showDetail="true"/>  
	 	 <h:selectOneMenu value="#{addBodyViewBean.bodyicon}"  
                         converter="player" height="250"  
                         effect="fade" var="p">  
  
            <f:selectItem itemLabel="Select One" itemValue="" />  
            <f:selectItems value="#{autoCompleteBean.players}"  
                        var="player" itemLabel="#{player.name}"  
                        itemValue="#{player}"/>  
          </h:selectOneMenu>
            <p:column>  
                <p:graphicImage value="/images/barca/#{p.photo}"  
                        width="40" height="50"/>  
            </p:column>  
	 	</h:panelGroup>
		<h:panelGroup style="float: right;">
	     	<h:outputText value="描述："/>
	 	</h:panelGroup>
		<h:panelGroup style="float: left;">
			<h:inputTextarea id="bodyDesc" value="#{addBodyViewBean.bodydesc}"
				style="width:300px;height:100px;" />
		</h:panelGroup>
	</h:panelGrid>
	</center>
	</ui:define>
	<ui:define name="compButtons">
	    <p:commandButton actionListener="#{bbsBodyAction.save}"
			title="保存" 
			onstart="this.disabled=true"
			onclick="#{commonContentViewBean.id}_dialog.hide();"
			image="./img/icons/add.png" 
			value="保存" 
			style="margin:5px;"
			update="#{addBodyViewBean.id}_form">
		    <h:inputHidden  value="#{addBodyViewBean.id}"/>
		</p:commandButton>		
		<p:commandButton 
		    title="关闭" 
		    image="./img/icons/cancel.png"
		    onclick="#{commonContentViewBean.id}_dialog.hide();" 
		    type="button" 
		    value="关闭" 
		    style="margin:5px;">
		</p:commandButton>
	</ui:define>
</ui:composition>
